<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .box{
      width: 100%;
      height: 500px;
      position: relative;
      background-color: blue;
    }

    div div{
      width: 301px;
      height: 301px;
      background: url(./20231017211318.png) center / cover no-repeat;
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      margin: auto;
      transition: all 1s;
    }

    .box-front{
      background-position: left;
      z-index: 1;
    }

    .box-behind{
      background-position: right;
      z-index: 0;
      transform: rotateY(180deg);
    }

    .box-front:hover{
      z-index: 0;
      transform: rotateY(180deg);
    }

    .box-front:hover+.box-behind{
      z-index: 1;
      transform: rotateY(0deg);
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="box-front"></div>
    <div class="box-behind"></div>
  </div>
</body>
</html>